from kivyx.widgets import Rectangle

from amaze.terrains import Floor, Wall


class TileW(Rectangle):
    TERRAIN_COLOR_MAP = {Floor: (1, 1, 1),
                         Wall: (0, 0, 0)}

    def __init__(self, tile):
        Rectangle.__init__(self)
        self.tile = tile
        self.size = (1, 1)
        self.pos = tile.coords
        self.rgb = TileW.TERRAIN_COLOR_MAP[tile.terrain]
